package com.baosight.sczx.zm.domain;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.StringUtils;

public class ZM90 extends DaoEPBase {
	
	private String fdProjectName = " "; /* 工程名称 */
	private String fdProjectType = " "; /* 工程类型 */
	private String fdProjectStatus = " "; /* 工程状态 */
	private BigDecimal fdPlanData = new BigDecimal("0"); /* 工程计划量*/
	private String fdUnit = " ";		/* 计量单位*/
	private BigDecimal fdMonthValidateData = new BigDecimal("0"); /* 本月验收量*/
	private BigDecimal fdSumValidateData = new BigDecimal("0"); /* 累计验收量*/
	private BigDecimal fdMonthReportData = new BigDecimal("0"); /* 本月汇报量*/
	private BigDecimal fdSumReportData = new BigDecimal("0"); /* 累计汇报量*/
	
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdProjectName");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("工程名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProjectType");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("工程类型");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdProjectStatus");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("工程状态");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdPlanData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("工程计划量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdUnit");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("计量单位");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdMonthValidateData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("本月验收量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdSumValidateData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("累计验收量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdMonthReportData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("本月汇报量");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdSumReportData");
		eiColumn.setType("N");
		eiColumn.setScaleLength(5);
		eiColumn.setFieldLength(15);
		eiColumn.setDescName("累计汇报量");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZM90() {
		initMetaData();
	}

	/**
	 * get the fdProjectName - 工程名称
	 * 
	 * @return the fdProjectName
	 */
	public String getFdProjectName() {
		return this.fdProjectName;
	}
	
	/**
	 * set the fdProjectName - 工程名称
	 */
	public void setFdProjectName(String fdProjectName) {
		this.fdProjectName = fdProjectName;
	}
	
	/**
	 * get the fdProjectType - 工程类型
	 * 
	 * @return the fdProjectType
	 */
	public String getFdProjectType() {
		return this.fdProjectType;
	}
	
	/**
	 * set the fdProjectType - 工程类型
	 */
	public void setFdProjectType(String fdProjectType) {
		this.fdProjectType = fdProjectType;
	}
	
	/**
	 * get the fdProjectStatus - 工程状态
	 * 
	 * @return the fdProjectStatus
	 */
	public String getFdProjectStatus() {
		return this.fdProjectStatus;
	}
	
	/**
	 * set the fdProjectStatus - 工程状态
	 */
	public void setFdProjectStatus(String fdProjectStatus) {
		this.fdProjectStatus = fdProjectStatus;
	}
	
	/**
	 * get the fdPlanData - 工程计划量
	 * @return the fdPlanData
	 */
	public BigDecimal getFdPlanData() {
		return this.fdPlanData;
	}
	
	/**
	 * set the fdPlanData - 工程计划量
	 */
	public void setFdPlanData(BigDecimal fdPlanData) {
		this.fdPlanData = fdPlanData;
	}
	
	/**
	 * get the fdUnit - 计量单位
	 * 
	 * @return the fdUnit
	 */
	public String getFdUnit() {
		return this.fdUnit;
	}
	
	/**
	 * set the fdUnit - 计量单位
	 */
	public void setFdUnit(String fdUnit) {
		this.fdUnit = fdUnit;
	}
	
	
	/**
	 * get the fdMonthValidateData - 本月验收量
	 * @return the fdMonthValidateData
	 */
	public BigDecimal getFdMonthValidateData() {
		return this.fdMonthValidateData;
	}
	
	/**
	 * set the fdMonthValidateData - 本月验收量
	 */
	public void setFdMonthValidateData(BigDecimal fdMonthValidateData) {
		this.fdMonthValidateData = fdMonthValidateData;
	}
	
	/**
	 * get the fdSumValidateData - 累计验收量
	 * @return the fdSumValidateData
	 */
	public BigDecimal getFdSumValidateData() {
		return this.fdSumValidateData;
	}
	
	/**
	 * set the fdSumValidateData - 累计验收量
	 */
	public void setFdSumValidateData(BigDecimal fdSumValidateData) {
		this.fdSumValidateData = fdSumValidateData;
	}
	
	/**
	 * get the fdMonthReportData - 本月汇报量
	 * @return the fdMonthReportData
	 */
	public BigDecimal getFdMonthReportData() {
		return this.fdMonthReportData;
	}
	
	/**
	 * set the fdMonthReportData - 本月汇报量
	 */
	public void setFdMonthReportData(BigDecimal fdMonthReportData) {
		this.fdMonthReportData = fdMonthReportData;
	}
	
	/**
	 * get the fdSumReportData - 累计汇报量
	 * @return the fdSumReportData
	 */
	public BigDecimal getFdSumReportData() {
		return this.fdSumReportData;
	}
	
	/**
	 * set the fdSumReportData - 累计汇报量
	 */
	public void setFdSumReportData(BigDecimal fdSumReportData) {
		this.fdSumReportData = fdSumReportData;
	}
	
	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) 
	{
		setFdProjectName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectName")), fdProjectName));
		setFdProjectType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectType")), fdProjectType));
		setFdProjectStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProjectStatus")), fdProjectStatus));
		setFdPlanData(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdPlanData")), fdPlanData));
		setFdUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUnit")), fdUnit));
		setFdMonthValidateData(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdMonthValidateData")), fdMonthValidateData));
		setFdSumValidateData(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdSumValidateData")), fdSumValidateData));
		setFdMonthReportData(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdMonthReportData")), fdMonthReportData));
		setFdSumReportData(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdSumReportData")), fdSumReportData));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {
		Map map = new HashMap();
		map.put("fdProjectName", StringUtils.toString(fdProjectName, eiMetadata.getMeta("fdProjectName")));
		map.put("fdProjectType", StringUtils.toString(fdProjectType, eiMetadata.getMeta("fdProjectType")));
		map.put("fdProjectStatus", StringUtils.toString(fdProjectStatus, eiMetadata.getMeta("fdProjectStatus")));
		map.put("fdPlanData", StringUtils.toString(fdPlanData, eiMetadata.getMeta("fdPlanData")));
		map.put("fdUnit", StringUtils.toString(fdUnit, eiMetadata.getMeta("fdUnit")));
		map.put("fdMonthValidateData", StringUtils.toString(fdMonthValidateData, eiMetadata.getMeta("fdMonthValidateData")));
		map.put("fdSumValidateData", StringUtils.toString(fdSumValidateData, eiMetadata.getMeta("fdSumValidateData")));
		map.put("fdMonthReportData", StringUtils.toString(fdMonthReportData, eiMetadata.getMeta("fdMonthReportData")));
		map.put("fdSumReportData", StringUtils.toString(fdSumReportData, eiMetadata.getMeta("fdSumReportData")));

		return map;
	}
}
